package com.mchat.ratelimit.strategy;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class StrategyFactory {
    static Map<String,AbstractRateLimitStrategy> strategyMap = new ConcurrentHashMap<>();
    public static void register(String strategyName,AbstractRateLimitStrategy strategy){
        strategyMap.put(strategyName,strategy);
    }
    public static AbstractRateLimitStrategy get(String key  ){
        return strategyMap.get(key);
    }
}
